<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body{
            height: 600px;
        }
    </style>
</head>
<body>
    <button>点击</button>
    <!--  高版本的jquery 没有toggle函数了  -->
    <script src="./js/jquery-1.8.3.min.js"></script>
    <script>
        $(function(){
            $("button").toggle(
                function(){
                    $("body").css("background","red");
                },
                function(){
                    $("body").css("background","green");
                },
                function(){
                    $("body").css("background","blue");
                },
                function(){
                    $("body").css("background","yellow");
                }
            );
        })
    </script>
</body>
</html>